In [1]:
import numpy as np
import sympy as sp
from IPython.display import display, Latex, Markdown
import plotly
import plotly.graph_objects as go
import sys, os
sys.path.append('../Chapitre 8 - Valeurs propres, vecteurs propres, diagonalisation')
from Ch8_lib import *
sys.path.append('../Librairie')
import AL_Fct as al
from Ch10_lib import *
DÉFINITION:¶
Une forme quadratique $Q$ sur $\mathbb{R}^{n}$ est une application $Q: \mathbb{R}^{n} \rightarrow \mathbb{R}$ définie par une matrice symétrique $A \in M_{n \times n}(\mathbb{R})$ de telle sorte que $Q(u)=u A u^{T}$ pour tout $u \in \mathbb{R}^{n}$. Aussi, si $x_{1}, \ldots, x_{n}$ sont des variables, alors l'équation $Q\left(x_{1}, \ldots, x_{n}\right)=1$ définit une conique dans $\mathbb{R}^{2}$ (respectivement, une quadrique dans $\mathbb{R}^{3}$ ).
Exercice 1 :¶
Determinez si les expressions suivantes correspondent à des formes quadratiques.
In [2]:
ch10_7_ex_1_1()
Le polynôme $Q = x_{1}^{2} - 5 x_{1} x_{2} + x_{1} x_{3} - x_{1} x_{4} + 4 x_{2}^{2} + 2 x_{2} x_{3} - 4 x_{2} x_{4} + x_{3}^{2} + x_{3} x_{4} - x_{4}^{2}$ est-il une forme quadratique ?
In [3]:
ch10_7_ex_1_2()
Le polynôme $Q = \left(x_{1} + x_{2}\right)^{2} + \left(x_{3} - 1\right)^{2}$ est-il une forme quadratique ?
In [4]:
ch10_7_ex_1_3()
Le polynôme $Q = 3 x_{1}^{2} + x_{1} x_{2} - x_{1} x_{3} + x_{2}^{2} + 2 x_{2} x_{3} + x_{3}^{3}$ est-il une forme quadratique ?
Exercice 2 :¶
Trouvez la matrice symétrique $A$ telle que $\mathbf{x}^T A \mathbf{x} = Q(\mathbf{x})$ avec $\mathbf{x} = \left(\begin{array}{l}x_{1} \\ x_{2} \\ .. \\ .. \\ x_{n}\end{array}\right) $
In [5]:
ch10_7_ex_2(1)
Rentrez la matrice symétrique $A$ telle que $\mathbf{x}^T A \mathbf{x}=Q(\mathbf{x})$, où $Q(\mathbf{x})=- 2 x_{1}^{2} + 6 x_{1} x_{2} + 4 x_{2}^{2}$
A =
In [6]:
ch10_7_ex_2(2)
Rentrez la matrice symétrique $A$ telle que $\mathbf{x}^T A \mathbf{x}=Q(\mathbf{x})$, où $Q(\mathbf{x})=x_{1}^{2} + 6 x_{1} x_{3} - 2 x_{2}^{2} - \frac{x_{2} x_{3}}{2} + 4 x_{3}^{2}$
A =
In [7]:
ch10_7_ex_2(3)
Rentrez la matrice symétrique $A$ telle que $\mathbf{x}^T A \mathbf{x}=Q(\mathbf{x})$, où $Q(\mathbf{x})=- x_{1}^{2} - 2 x_{1} x_{2} + 6 x_{1} x_{3} - 2 x_{2}^{2} + 8 x_{2} x_{4} - 2 x_{3} x_{4} + 2 x_{4}^{2}$
A =